package com.dmap.knowledge.vo;

import com.dmap.knowledge.po.Banner;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class AppBannerVo implements Serializable {
    private String imageUrl;                        //图片地址
    private String jumpUrl;                         //跳转地址
    private long bannerId;                          //bannerid
    private long articleId;                         //文章id
    private String title;                           //文章标题
    private String summary;                         //文章简介
    private List<String> tags = new ArrayList<>();  //文章标签
    private int type;                               //文章类型
    private int browseNumber;                       //浏览数量
    
    public AppBannerVo(Banner banner) {
        
        if (banner.getImageUrl() != null) {
            this.imageUrl = banner.getImageUrl();
            
        }
        if (banner.getJumpUrl() != null) {
            this.jumpUrl = banner.getJumpUrl();
            
        }
        if (banner.getId() != null) {
            this.bannerId = banner.getId();
            
        }
        if (banner.getJumpId() != null) {
            this.articleId = banner.getJumpId();
            
        }
        
        if (banner.getTitle() != null) {
            this.title = banner.getTitle();
            
        }
        if (banner.getType() != null) {
            this.type = banner.getType();
            
        }
        if (banner.getBrowseNumber() != null) {
            this.browseNumber = banner.getBrowseNumber();
        }
        
    }
    
    
    public String getImageUrl() {
        return imageUrl;
    }
    
    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }
    
    public String getJumpUrl() {
        return jumpUrl;
    }
    
    public void setJumpUrl(String jumpUrl) {
        this.jumpUrl = jumpUrl;
    }
    
    public long getBannerId() {
        return bannerId;
    }
    
    public void setBannerId(long bannerId) {
        this.bannerId = bannerId;
    }
    
    public long getArticleId() {
        return articleId;
    }
    
    public void setArticleId(long articleId) {
        this.articleId = articleId;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public String getSummary() {
        return summary;
    }
    
    public void setSummary(String summary) {
        this.summary = summary;
    }
    
    public List<String> getTags() {
        return tags;
    }
    
    public void setTags(List<String> tags) {
        this.tags = tags;
    }
    
    public int getType() {
        return type;
    }
    
    public void setType(int type) {
        this.type = type;
    }
    
    public int getBrowseNumber() {
        return browseNumber;
    }
    
    public void setBrowseNumber(int browseNumber) {
        this.browseNumber = browseNumber;
    }
}
